#include <iostream>
using namespace std;

bool is_hex(char c){
  return false; // TODO
}

unsigned char parse_byte(unsigned char hi, unsigned char lo){
  return 0; // TODO
}

int main() {
  for(char hi, lo; cin >> hi >> lo;){
    cout << hi << lo << ": ";
    if(is_hex(hi) && is_hex(lo)){ // 重用
      cout << (int)parse_byte(hi, lo) << endl;
    }else{
      cout << "invalid" << endl;
    }
  }
}